<template>
  <div class="newPlay" ref="homePage">
    <v-search></v-search>
    
    <div style="position: relative;">
      <img style="width: 100%;display: block;" src="@/assets/oidtour/top1.jpg" />
    </div>
    <div style="position: relative;padding: 0 0.625rem;" class="center">
      <img style="position: absolute;top: 0;left: 0;right: 0;" width="100%" src="@/assets/oidtour/top2.png" />
      <div class="new-item">
        <div class="img-box">
          <img style="width: 100%;display: block;" src="https://resource.sz-trip.com/wximg/Sightseeing/list001.jpg" />
          <p class="manyidu">100%满意度</p>
          <p class="price">￥<span style="font-size: 1.1875rem;">330</span>起</p>
        </div>
        <div class="text-box1">
          <p class="title">【阳澄湖大闸蟹】公蟹3~3.4两 母蟹2~2.4两 （5对十只装）</p>
        </div>
        <div class="text-box1">
          <p class="intro">可邮寄或堂食、自取</p>
          <p class="gzd">
            <van-icon name="like" />已售 60</p>
        </div>
      </div>
    </div>


  </div>
</template>

<script>
  import search from '../search.vue'
  export default {
    components: {
      "v-search": search,
    },
    data() {
      return {
        clintHeigth: '', //获取页面高度
      }
    },

    mounted() {
      this.clientHeight = `${document.documentElement.clientHeight}` //document.body.clientWidth;
      // console.log(this.clientHeight);
      // let dd = 100;
      this.$refs.homePage.style.minHeight = this.clientHeight + 'px';
    },
  }
</script>

<style lang="scss">
  .newPlay {
    .center {
      box-sizing: border-box;
      outline: 0;

      .new-item {
        padding: 0.625rem;
        background: white;
        margin-bottom: 0.625rem;
        position: relative;
        .img-box {
          position: relative;

          .manyidu {
            position: absolute;
            bottom: 0;
            right: 0;
            left: 0;
            padding: 0.3125rem 0.625rem;
            background: hsla(0, 0%, 49%, .5);
            color: white;
            font-size: 0.6875rem;
          }

          .price {
            display: inline-block;
            padding-left: 0.8125rem;
            padding-right: 0.3125rem;
            height: 1.625rem;
            line-height: 1.625rem;
            background: #f75a61;
            position: absolute;
            right: 0;
            bottom: 1.9375rem;
            border-top-left-radius: 0.8125rem;
            border-bottom-left-radius: 0.8125rem;
            color: white;
            font-size: 0.5625rem;
          }
        }

        .text-box1 {
          display: flex;
          justify-content: space-between;

          .title {
            color: #3e3e3e;
            font-size: 0.8125rem;
            margin-top: 0.3125rem;
          }

          .intro {
            font-size: 0.625rem;
            color: #747474;
            margin-top: 0.3125rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }

          .gzd {
            color: #f75a61;
            margin-top: 0.3125rem;
            font-size: 0.6875rem;
            text-align: center;
            flex-shrink: 0;
          }
        }
      }
    }

  }
</style>
